﻿/*
 * Weixin Share
 * @version 0.1
 * @author www.qinco.net
 * @license The MIT License (MIT)
 */

var weixinSharePath = "https://dn-qinco.qbox.me/weixinShare/";

function loadCss(F) {
    var _qfn = document.createElement("link");
    _qfn.rel = "stylesheet";
    _qfn.type = "text/css";
    _qfn.href = F;
    _qfn.media = "screen,print";
    document.getElementsByTagName("head")[0].appendChild(_qfn);
}


loadCss(weixinSharePath + "css.min.css");

var weixinShareAgent = window.navigator.userAgent;
if (weixinShareAgent.indexOf('MicroMessenger/') > -1) {
    var weixinShare_Box = document.createElement("div");
    weixinShare_Box.style.position = 'absolute';
    weixinShare_Box.style.top = '0';
    weixinShare_Box.style.right = '20px';
    weixinShare_Box.style.zIndex = '20';
    weixinShare_Box.innerHTML = "<div class='weixinShareAnimated weixinShareBounceInUp'><img src='" + weixinSharePath + "img/weixinShare02.png' width=150 height=150 /></div>";

    document.body.appendChild(weixinShare_Box);

    setTimeout(function () {
        weixinShare_Box.className = 'weixinShareAnimated weixinShareWobble';
    }, 5000);
}